package cn.wolfcode.luowowo.repository;

import cn.wolfcode.luowowo.domain.Destination;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.ArrayList;
import java.util.List;

public interface DestinationRepository extends MongoRepository<Destination, String> {
    //根据关联目的地id查询目的地对象集合
    List<Destination> findByidIn(List<String> refIds);

    //查询中国下的省份
    List<Destination> findByParentName(String parentName);

    //查询非国内的子目的省份
    List<Destination> findByIdIn(List<String> refIds);

    //查询省份的id
    List<Destination> findByParentId(String id, Pageable pageable);

    Destination findByName(String keyword);
}
